package com.wiz.weixin.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import net.sf.json.JSONArray;

import org.springframework.stereotype.Service;

import com.wiz.weixin.VO.ProductDiscount;
import com.wiz.weixin.VO.StationDiscount;
import com.wiz.weixin.common.Constant;
import com.wiz.weixin.manager.HttpManager;
import com.wiz.weixin.service.OilStationService;
@Service("oilStationService")
public class OilStationServiceImpl implements OilStationService {
	@Resource
	private HttpManager httpManager;
	@Override
	public Map<String, List<ProductDiscount>> listOilPrice(String openId) {
		
		
		
		
		
		Map<String,List<ProductDiscount>>map = new HashMap<String,List<ProductDiscount>>();
		List<ProductDiscount>list = new ArrayList<ProductDiscount>();
		list.add(new ProductDiscount("#93", 8.9));
		list.add(new ProductDiscount("#97", 8.9));
		list.add(new ProductDiscount("#0", 8.9));
		map.put("孵化园加油站", list);
		map.put("软件园加油站", list);
		JSONArray jsonArray = JSONArray.fromObject(map);
		return map;
	}

	@Override
	public JSONArray getDescribe(String openid) {
		List<StationDiscount> discounts = new ArrayList<StationDiscount>();
		discounts.add(new StationDiscount("孵化园加油站",null,"孵化园加油站介绍"));
		discounts.add(new StationDiscount("软件园加油站",null,"软件园加油站介绍"));
		
		JSONArray jsonArray = JSONArray.fromObject(discounts);
		
		return jsonArray;
	}

}
